<html>
    <head>
        <meta name="robots" content="noindex, nofollow">
        <meta name="apple-mobile-web-app-capable" content="no" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black" />
        <meta name="viewport" content="width=device-width,initial-scale=0.69,user-scalable=yes,maximum-scale=1.00" />
        <title>My Simply Agenda - Back Office </title>
        <link rel="stylesheet" type="text/css" href="style/style.css" />
        <link rel="stylesheet" type="text/css" href="style/menu.css" />
        <link rel="stylesheet" type="text/css" href="style/styles.css" />
        <link href='http://fonts.googleapis.com/css?family=Ubuntu:400,700' rel='stylesheet' type='text/css'>

        <!--<script type="text/javascript" src="js/plugins/date.js"></script>-->
        <script type="text/javascript" src="js/plugins/jquery.weekcalendar.js"></script>
        <script type="text/javascript" src="js/plugins/jquery.dynatree.min.js"></script>
        <script type="text/javascript" src="js/plugins/jquery.slidepanel.min.js"></script>

        <script type="text/javascript" src="js/calendar/ajax_create_client.js"></script>
        <script type="text/javascript" src="js/calendar/delete_events.js"></script>
        <script type="text/javascript" src="js/calendar/slot_popup.js"></script>
        <script type="text/javascript" src="js/calendar/week_calendar.js"></script>
        
        <script type="text/javascript" src="js/behaviours.js"></script>
        <script type="text/javascript" src="js/config_functions.js"></script>
        <script type="text/javascript" src="js/campaign.js"></script>
        <script type="text/javascript" src="js/application.js"></script>
    </head>
    <body id="index">
        <?php
        Tools_TimeZoneObject::initTimeZone();
        Access_ControlObject::watch();
        global $licence_object; 
        Access_AuthObject::authenticate(); 
        ?>
        <?php if (is_object($licence_object) && $licence_object->bloquer == 0): ?>

            <? if (Access_ControlObject::is_logged() != null && strstr(Access_ControlObject::get('server_infos'), Access_AuthObject::getBaseURL()) === FALSE) : ?>
                <!-- User is logged but server infos does not match -->
            <br/><center><h2>Vous êtes connecté sur une autre instance de My Simply Agenda.<br/><br/> 
                    <a href="<?= Erra_System_PageBuilder::makeLink('disconnect-user') ?>">Cliquez ici</a> pour vous deconnecter des instances de My Simply Agenda et vous reconnecter à celle ci.
                </h2></center> 
        <? else: ?>
            <div id="wrapper">
                <div id="container">
                    <?= Tools_HelpVideoObject::displayHelpVideo($licence_object) ?>
                    <region name="header"></region>
                    <region name="content"></region>
                    <region name="footer"></region>
                    <!-- HTML Hidden widgets -->
                    <div class="modalOverlay"></div> 
                    <div class="ajax-config-validator"><span>Modifications enregistrées</span>&nbsp;&nbsp;&nbsp;<img src="<?= config_get('framework_images') . '/cmsimages/icon-success.png' ?>" /></div>
                    <div class="ajax-config-error"><span></span><img src="<?= config_get('framework_images') . '/cmsimages/icon-error.png' ?>" /></div>
                    <div class="ajax-config-loader" style="display:none;"></div>
                    <div id="message" title="Information"></div>
                    <div id="notification" title="Notification"></div>
                    <div class="demo-banner"></div>
                </div>
            </div>

        <?php endif; ?>
    <?php else : ?>
        <br/><center><h2>Votre accès à MySimplyAgenda est bloqué.<br/><br/> 
                Veuillez contacter IBC au  0 892 490 039 pour débloquer votre accès<br/>
                Votre numéro de série est le <font color="blue"><?= config_get('application.serial') ?></font>
            </h2></center>
    <?php endif; ?>
</body>
</html>
